Skip to content

Accessibility: focus trapping, ARIA live regions, keyboard nav, and non-color state indicators - #36

Draft
WFord26 with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-accessibility-calendar-indicators
Draft

Accessibility: focus trapping, ARIA live regions, keyboard nav, and non-color state indicators#36
WFord26 with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-accessibility-calendar-indicators

Conversation

Copilot AI commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Addresses ~8% color-blind users and all keyboard/screen-reader users who couldn't navigate the booking flow or receive screen reader announcements for status changes.

Focus Management

New useFocusTrap hook (utils/useFocusTrap.ts) — applied to all modals:

  • Auto-focuses first focusable element on mount
  • Traps Tab/Shift+Tab within container
  • Restores focus to the triggering element on unmount

All modals (ConfirmDialog, CreateProjectModal, AddTimeBlockModal, AvailabilitySolverModal) also close on Escape and use aria-labelledby pointing to their visible heading.

Toast Screen Reader Announcements

Split single aria-live="polite" container into two regions:

  • Errors → role="alert" + aria-atomic="true" (assertive, interrupts immediately)
  • Success/Info → aria-live="polite" (non-interrupting)

Close buttons get aria-label="Dismiss notification"; decorative icons get aria-hidden="true".

Booking Slot Accessibility (PublicBookingPage)

  • Slot lists: role="radiogroup" + descriptive aria-label
  • Each radio input carries a full label: "Time slot: [date/time], [N] remaining, Engineers: [names]"
  • Full slots: label includes "Full — join waitlist"
  • Inline "Available" / "Full" text badges — state readable without color
  • Inline errors: role="alert"

Calendar Date Picker (AddTimeBlockModal)

  • Container: role="group" (was incorrectly role="grid")
  • Each day button: aria-label (full date, "Today", "Outside current month"), aria-pressed for selection state

Focus Ring & Visual State CSS

  • Global :focus-visible — 3px solid accent outline on all interactive elements; form inputs additionally change border-color; anchors get border-radius
  • Calendar selected days: checkmark ::after pseudo-element + bold font + thicker border (grayscale-safe)
  • Calendar outside-month days: italic + opacity: 0.55
  • Slot status badges: styled with color and text label (color-independent)
  • Toast stacks: errors top-right, success/info bottom-right

Copilot AI changed the title [WIP] Fix accessibility issues in calendar state indicators Accessibility: focus trapping, ARIA live regions, keyboard nav, and non-color state indicators Apr 15, 2026
Copilot AI requested a review from WFord26 April 15, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility: Color-Only State Communication + Keyboard Navigation

2 participants